AMOTION_EVENT_AXIS_X

Constants that identify each individual axis of a motion event. @anchor AMOTION_EVENT_AXIS

Values

ValueMeaning
AMOTION_EVENT_AXIS_X0

Axis constant: X axis of a motion event.

- For a touch screen, reports the absolute X screen position of the center of the touch contact area. The units are display pixels. - For a touch pad, reports the absolute X surface position of the center of the touch contact area. The units are device-dependent. - For a mouse, reports the absolute X screen position of the mouse pointer. The units are display pixels. - For a trackball, reports the relative horizontal displacement of the trackball. The value is normalized to a range from -1.0 (left) to 1.0 (right). - For a joystick, reports the absolute X position of the joystick. The value is normalized to a range from -1.0 (left) to 1.0 (right).

AMOTION_EVENT_AXIS_Y1

Axis constant: Y axis of a motion event.

- For a touch screen, reports the absolute Y screen position of the center of the touch contact area. The units are display pixels. - For a touch pad, reports the absolute Y surface position of the center of the touch contact area. The units are device-dependent. - For a mouse, reports the absolute Y screen position of the mouse pointer. The units are display pixels. - For a trackball, reports the relative vertical displacement of the trackball. The value is normalized to a range from -1.0 (up) to 1.0 (down). - For a joystick, reports the absolute Y position of the joystick. The value is normalized to a range from -1.0 (up or far) to 1.0 (down or near).

AMOTION_EVENT_AXIS_PRESSURE2

Axis constant: Pressure axis of a motion event.

- For a touch screen or touch pad, reports the approximate pressure applied to the surface by a finger or other tool. The value is normalized to a range from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device. - For a trackball, the value is set to 1 if the trackball button is pressed or 0 otherwise. - For a mouse, the value is set to 1 if the primary mouse button is pressed or 0 otherwise.

AMOTION_EVENT_AXIS_SIZE3

Axis constant: Size axis of a motion event.

- For a touch screen or touch pad, reports the approximate size of the contact area in relation to the maximum detectable size for the device. The value is normalized to a range from 0 (smallest detectable size) to 1 (largest detectable size), although it is not a linear scale. This value is of limited use. To obtain calibrated size information, see {@link AMOTION_EVENT_AXIS_TOUCH_MAJOR} or {@link AMOTION_EVENT_AXIS_TOOL_MAJOR}.

AMOTION_EVENT_AXIS_TOUCH_MAJOR4

Axis constant: TouchMajor axis of a motion event.

- For a touch screen, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are display pixels. - For a touch pad, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent.

AMOTION_EVENT_AXIS_TOUCH_MINOR5

Axis constant: TouchMinor axis of a motion event.

- For a touch screen, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are display pixels. - For a touch pad, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

AMOTION_EVENT_AXIS_TOOL_MAJOR6

Axis constant: ToolMajor axis of a motion event.

- For a touch screen, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact. - For a touch pad, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor.

AMOTION_EVENT_AXIS_TOOL_MINOR7

Axis constant: ToolMinor axis of a motion event.

- For a touch screen, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact. - For a touch pad, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor.

AMOTION_EVENT_AXIS_ORIENTATION8

Axis constant: Orientation axis of a motion event.

- For a touch screen or touch pad, reports the orientation of the finger or tool in radians relative to the vertical plane of the device. An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right). - For a stylus, the orientation indicates the direction in which the stylus is pointing in relation to the vertical axis of the current orientation of the screen. The range is from -PI radians to PI radians, where 0 is pointing up, -PI/2 radians is pointing left, -PI or PI radians is pointing down, and PI/2 radians is pointing right. See also {@link AMOTION_EVENT_AXIS_TILT}.

AMOTION_EVENT_AXIS_VSCROLL9

Axis constant: Vertical Scroll axis of a motion event.

- For a mouse, reports the relative movement of the vertical scroll wheel. The value is normalized to a range from -1.0 (down) to 1.0 (up).

This axis should be used to scroll views vertically.

AMOTION_EVENT_AXIS_HSCROLL10

Axis constant: Horizontal Scroll axis of a motion event.

- For a mouse, reports the relative movement of the horizontal scroll wheel. The value is normalized to a range from -1.0 (left) to 1.0 (right).

This axis should be used to scroll views horizontally.

AMOTION_EVENT_AXIS_Z11

Axis constant: Z axis of a motion event.

- For a joystick, reports the absolute Z position of the joystick. The value is normalized to a range from -1.0 (high) to 1.0 (low). <em>On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute X position of the second joystick instead.</em>

AMOTION_EVENT_AXIS_RX12

Axis constant: X Rotation axis of a motion event.

- For a joystick, reports the absolute rotation angle about the X axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).

AMOTION_EVENT_AXIS_RY13

Axis constant: Y Rotation axis of a motion event.

- For a joystick, reports the absolute rotation angle about the Y axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).

AMOTION_EVENT_AXIS_RZ14

Axis constant: Z Rotation axis of a motion event.

- For a joystick, reports the absolute rotation angle about the Z axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise). On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute Y position of the second joystick instead.

AMOTION_EVENT_AXIS_HAT_X15

Axis constant: Hat X axis of a motion event.

- For a joystick, reports the absolute X position of the directional hat control. The value is normalized to a range from -1.0 (left) to 1.0 (right).

AMOTION_EVENT_AXIS_HAT_Y16

Axis constant: Hat Y axis of a motion event.

- For a joystick, reports the absolute Y position of the directional hat control. The value is normalized to a range from -1.0 (up) to 1.0 (down).

AMOTION_EVENT_AXIS_LTRIGGER17

Axis constant: Left Trigger axis of a motion event.

- For a joystick, reports the absolute position of the left trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).

AMOTION_EVENT_AXIS_RTRIGGER18

Axis constant: Right Trigger axis of a motion event.

- For a joystick, reports the absolute position of the right trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).

AMOTION_EVENT_AXIS_THROTTLE19

Axis constant: Throttle axis of a motion event.

- For a joystick, reports the absolute position of the throttle control. The value is normalized to a range from 0.0 (fully open) to 1.0 (fully closed).

AMOTION_EVENT_AXIS_RUDDER20

Axis constant: Rudder axis of a motion event.

- For a joystick, reports the absolute position of the rudder control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).

AMOTION_EVENT_AXIS_WHEEL21

Axis constant: Wheel axis of a motion event.

- For a joystick, reports the absolute position of the steering wheel control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).

AMOTION_EVENT_AXIS_GAS22

Axis constant: Gas axis of a motion event.

- For a joystick, reports the absolute position of the gas (accelerator) control. The value is normalized to a range from 0.0 (no acceleration) to 1.0 (maximum acceleration).

AMOTION_EVENT_AXIS_BRAKE23

Axis constant: Brake axis of a motion event.

- For a joystick, reports the absolute position of the brake control. The value is normalized to a range from 0.0 (no braking) to 1.0 (maximum braking).

AMOTION_EVENT_AXIS_DISTANCE24

Axis constant: Distance axis of a motion event.

- For a stylus, reports the distance of the stylus from the screen. A value of 0.0 indicates direct contact and larger values indicate increasing distance from the surface.

AMOTION_EVENT_AXIS_TILT25

Axis constant: Tilt axis of a motion event.

- For a stylus, reports the tilt angle of the stylus in radians where 0 radians indicates that the stylus is being held perpendicular to the surface, and PI/2 radians indicates that the stylus is being held flat against the surface.

AMOTION_EVENT_AXIS_SCROLL26

Axis constant: Generic scroll axis of a motion event.

- This is used for scroll axis motion events that can't be classified as strictly vertical or horizontal. The movement of a rotating scroller is an example of this.

AMOTION_EVENT_AXIS_RELATIVE_X27

Axis constant: The movement of x position of a motion event.

- For a mouse, reports a difference of x position between the previous position. This is useful when pointer is captured, in that case the mouse pointer doesn't change the location but this axis reports the difference which allows the app to see how the mouse is moved.

AMOTION_EVENT_AXIS_RELATIVE_Y28

Axis constant: The movement of y position of a motion event.

Same as {@link RELATIVE_X}, but for y position.

AMOTION_EVENT_AXIS_GENERIC_132

Axis constant: Generic 1 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_233

Axis constant: Generic 2 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_334

Axis constant: Generic 3 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_435

Axis constant: Generic 4 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_536

Axis constant: Generic 5 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_637

Axis constant: Generic 6 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_738

Axis constant: Generic 7 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_839

Axis constant: Generic 8 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_940

Axis constant: Generic 9 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1041

Axis constant: Generic 10 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1142

Axis constant: Generic 11 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1243

Axis constant: Generic 12 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1344

Axis constant: Generic 13 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1445

Axis constant: Generic 14 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1546

Axis constant: Generic 15 axis of a motion event. The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_1647

Axis constant: Generic 16 axis of a motion event. The interpretation of a generic axis is device-specific.

Meta